<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_invoice/index/'),
		array('title'=>'票夹','icon'=>'icon-youhuiquan','action'=>'jy_invoice/list/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_invoice/member.index/'),
	);
	$hdps =array(
		array('title'=>'首页','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp01.jpg','action'=>'/index/'),
		array('title'=>'全部','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg','action'=>'/index/'),
	);
	$bankuai1 =array(
		array('title'=>'我的','img'=>'../addons/jy_invoice/resource/images/help.png','action'=>'/help/'),
		array('title'=>'开票说明','img'=>'../addons/jy_invoice/resource/images/shuoming.png','action'=>'/shuoming/'),
		array('title'=>'票夹','img'=>'../addons/jy_invoice/resource/images/chaicon.png','action'=>'/list/'),
	);
	$gongsis =array(
		array('title'=>'微信','img'=>'../addons/jy_invoice/resource/images/weixin.png','action'=>'/index/'),
		array('title'=>'支付宝','img'=>'../addons/jy_invoice/resource/images/alipay.png','action'=>'/index/'),
		array('title'=>'京东','img'=>'../addons/jy_invoice/resource/images/jd.png','action'=>'/index/'),
		array('title'=>'银联','img'=>'../addons/jy_invoice/resource/images/yinl.png','action'=>'/index/'),
		array('title'=>'闪付','img'=>'../addons/jy_invoice/resource/images/shanpay.png','action'=>'/index/'),
	);
	$return['item']=$this->plugin_setting('basic');
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$return['item']['hdps']=$return['item']['hdps']?$return['item']['hdps']:$hdps;
	$return['item']['bankuai1']=$return['item']['bankuai1']?$return['item']['bankuai1']:$bankuai1;
	$return['item']['gongsis']=$return['item']['gongsis']?$return['item']['gongsis']:$gongsis;
	$piao_types='在线购物|软件服务|业务服务';
	$return['item']['piao_types']=$return['item']['piao_types']?$return['item']['piao_types']:$piao_types;
	$return['type']=$this->type;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'switch','title'=>'是否启用？','name'=>'isopen','isradio'=>1),
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'image','title'=>'首页顶部logo','name'=>'toplogo'),
					array('type'=>'image','title'=>'首页横幅广告','name'=>'indexcube'),
					array('type'=>'string','title'=>'公众号名称','name'=>'ewm_title'),
					array('type'=>'string','title'=>'关注公众号二维码','name'=>'ewm_logo'),
					array('type'=>'string','title'=>'关注公众号链接地址','name'=>'ewm_link'),
					array('type'=>'string','title'=>'客服链接地址','name'=>'kflink'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
				'title'=>'开票信息',
				'list'=>array(
					array('type'=>'radio','title'=>'支持开票类型','name'=>'type','options'=>'type'),
					array('type'=>'string','title'=>'开票公司名称','name'=>'piao_company'),
					array('type'=>'string','title'=>'默认开票内容','name'=>'piao_type','help'=>'默认： 在线购物'),
					array('type'=>'string','title'=>'开票内容选项','name'=>'piao_types','help'=>'用|隔开，例如：在线购物|软件服务|业务服务'),
				)
			),
			array(
					'title'=>'界面UI配色',
					'list'=>array(
						array('type'=>'color_pool','title'=>'选择配色方案','name'=>'syscolor','help'=>''),
						array('type'=>'colorpicker','title'=>'站点颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #18bc9c'),
						array('type'=>'phone_tpl','name'=>'syscolor'),
					)
			),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
					)
			),
			array(
				'title'=>'板块导航',
					'list'=>array(
									array('type'=>'array','name'=>'bankuai1','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
				'title'=>'支持支付公司',
					'list'=>array(
									array('type'=>'array','name'=>'gongsis','add_tip'=>'添加一个公司',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'公司名称'),
										array('type'=>'image','name'=>'img','title'=>'公司图片'),
										array('type'=>'string','name'=>'action','title'=>'公司链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'公司名称'),
										array('type'=>'image','name'=>'img','title'=>'公司图片'),							
										array('type'=>'string','name'=>'action','title'=>'公司链接'),
									)
								),
					)
			),
			array(
				'title'=>'底部导航',
					'list'=>array(
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
